<%@ page import="java.lang.reflect.Array" %>
<%@ page import="java.util.Arrays" %><%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2025/2/5
  Time: 14:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <h1>Test</h1>
    <%
        String idStr = request.getParameter("id");
        Integer id = Integer.parseInt(idStr);
        id++;
        //将数据存入到requestz中
        request.setAttribute("number",id);
        //将请求转发给Test2.jsp
        request.getRequestDispatcher("Test2.jsp").forward(request,response);
    %>
    <%=id%>

<%--    获取客户端传来的多个参数--%>
<%--    <%--%>
<%--    String[] names = request.getParameterValues("name");--%>
<%--    %>--%>
<%--    <%=Arrays.toString(names)%>--%>
</body>
</html>
